﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MoneyAdd.aspx.cs" Inherits="Wwtfly.BBS.ForeApplication.WebForm.MoneyAdd" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>在线充值</title>
    <link rel="stylesheet" type="text/css" href="css/style.css"/>
    <script src="Script/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        function imgBtnBuy_onclick() {
            
        }

    </script>
    

</head>
<body>
    <form id="form1" runat="server">
        <asp:HiddenField ID="hdBankCode" runat="server" />
<table border="0" cellspacing="0" cellpadding="0" style="width:100%; line-height:30px;">
              <tr>
                <td colspan="2"><div class="login">网上支付</div></td>
              </tr>
              <tr>
                <td colspan="2" >
                
                <div class="s_level">
              温馨提示：网上充值<span class="red">0</span>手续费！简单三步搞定充值，<span class="red">充值成功后1到5分钟及时到账！</span></div>
              </td>
              </tr>
  </table>
     <asp:Panel ID="pnlFirst" runat="server" Visible="true">
    <table border="0" cellspacing="0" cellpadding="0" style="width:100%; line-height:30px;">
                  <tr>
                    <td width="15%" >充值金额：</td>
                    <td width="84%"><input id="PayMoney" type="text"  style="height:20px; width:150px;" value="存入金额至少1元"  runat="server" /></td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>
                  <tr>
                    <td>选择网上银行:</td>
                    <td>

                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td><input name="payWay" type="radio" id="radyeepay" value="1"  checked="true"  runat="server"/>
                            <img src="images/bank_logo/logo_yeepay.gif" width="121" height="27" /></td>
                        <td></td>
                        <td></td>
                      </tr>
                      <tr><td><input type="radio" name="payWay" id="radCCB" value="1"  runat="server"/>
                        <img src="images/bank_logo/logo_jsyh.gif" width="121" height="27" /> </td>
                      <td> <input type="radio" name="payWay" id="radICBCB2C" value="1" runat="server"/><img src="images/bank_logo/logo_hsyh.gif" width="121" height="27" /></td>
                      <td><input type="radio" name="payWay" id="radCMB" value="1" runat="server"/><img src="images/bank_logo/logo_zsyhj.gif" width="121" height="27" /></td></tr>
                       <tr><td> <input type="radio" name="payWay" id="radBOCB2C" value="1" runat="server"/><img src="images/bank_logo/logo_zgyh.gif" height="27" /></td>
                       <td><input type="radio" name="payWay" id="radABC" value="1" runat="server"/> <img src="images/bank_logo/logo_nyyh.gif" width="121" height="27" /></td>
                       <td> <input type="radio" name="payWay" id="radCOMM" value="1" runat="server"/><img src="images/bank_logo/logo_jtyh.gif" width="121" height="27" /></td></tr>
                        <tr><td><input type="radio" name="payWay" id="radSPDB" value="1" runat="server"/><img src="images/bank_logo/logo_shpd.gif" width="121" height="27" /></td>
                        <td><input type="radio" name="payWay" id="radGDB" value="1" runat="server"/><img src="images/bank_logo/logo_gdfzyh.gif" width="121" height="27" /></td>
                        <td> <input type="radio" name="payWay" id="radGDYH" value="1" runat="server"/><img src="images/bank_logo/logo_gdyh.gif" width="121" height="27" /></td></tr>
                        <tr><td><input type="radio" name="payWay" id="radCIB" value="1" runat="server"/><img src="images/bank_logo/logo_xyyh.gif" width="121" height="27" /></td>
                        <td> <input type="radio" name="payWay" id="radSDB" value="1" runat="server"/><img src="images/bank_logo/logo_szfzyh.gif" width="121" height="27" /></td>
                        <td> <input type="radio" name="payWay" id="radCMBC" value="1" runat="server"/> <img src="images/bank_logo/logo_zgms.gif" width="121" height="27" /></td>
                        </tr>
                        <tr><td><input type="radio" name="payWay" id="radBCCBEB" value="1" runat="server"/><img src="images/bank_logo/logo_bjyh.gif" width="121" height="27" /></td><td></td><td></td></tr>
                    </table>

               
                    </td>
                  </tr>
                  <tr>
                    <td  align="right">&nbsp;</td>
                    <td>
                    &nbsp;</td>
                  </tr>

                  <tr>
                    <td>&nbsp;     </td>
                    <td><asp:ImageButton ID="ImageButton1" Width="100"  Height="35" AlternateText="充值" ImageUrl="images/bank_logo/bt_next.jpg" 
                            runat="server" onclick="ImageButton1_Click" OnClientClick="return imgBtnBuy_onclick()" /></td>
                  </tr>
                  <tr>
                 
                    <td colspan="2" style="font-size:12px; text-align:center;">&nbsp;</td>
                  </tr>
    </table>
     </asp:Panel>

        <asp:Panel ID="pnlSecond" runat="server" Visible="false">
                    <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#C0DBF9" style="margin-top: 15px;">
                        <tr>
                            <td height="10" colspan="2" align="right" bgcolor="#FFFFFF" >
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td width="12%" height="30" align="right" bgcolor="#FFFFFF" >
                                <span">*</span>您的充值金额：
                            </td>
                            <td width="70%" align="left" bgcolor="#FFFFFF"  style="padding-left: 10px;">
                                <table width="100%" border="0" cellspacing="0" cellpadding="0" id="nottd">
                                    <tr>
                                        <td style="text-align:left; font-size:14px; font-weight:bold">
                                            <span >
                                                <asp:Label ID="lbPayMoney" runat="server"></asp:Label></span>元
                                        </td>
                                        <td width="77%" align="left" bgcolor="#FFFFFF" >
                                            &nbsp;
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td height="30" align="right" valign="top" bgcolor="#FFFFFF"  style="padding-top: 10px;">
                                <span class="red12">*</span>选择支付方式：
                            </td>
                            <td height="30" align="left" valign="top" bgcolor="#FFFFFF" style="padding: 10px 0px 10px 10px;">
                                <table width="100%" border="0" cellspacing="0" cellpadding="0" id="nottd">
                                    <tr>
                                        <td style="text-align:left">
                                            <img id="BankImg" src="images/bank_logo/logo_<%=BankName%>.gif" width="121" height="27" />
                                        </td>
                                        <td width="76%">
                                            <asp:LinkButton ID="lbReturn" runat="server" Text="返回重新选择支付方式" OnClick="lbReturn_Click"></asp:LinkButton></td></tr></table><table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top: 15px;" id="nottd">
                                    <tr >
                                        <td style="text-align:left" >
                                            <asp:HyperLink ID="hlOK" runat="server" Target="_blank"><img src="images/bank_logo/bt_wy.jpg" border="0" /></asp:HyperLink></td><td  style="text-align:left">将会在新窗口中打开支付页面。</td></tr><tr>
                                        <td colspan="2" style="color:Red">
                                            <span style="color: #000000;font-size:13px; font-weight: normal">注：为了及时到帐，充值完成后【</span>请不要关闭网银或支付窗口<span
                                                style="color: #000000;font-size:13px; font-weight: normal">】 ，系统会自动跳转回本网站！</span>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
         </asp:Panel>   

            
    </form>
</body>
</html>
<script type="text/javascript">

    function CheckMultiple(sender) {
        var money = StrToFloat(sender.value);
        sender.value = money;

        if (money < 5) {
            if (window.location.href.indexOf(".wzwbw.") > 0)//测试:可以冲小于2元
            {
                return;
            }

            if (confirm("充值金额不正确，按“确定”重新输入，按“取消”自动更正为 5 元，请选择。")) {
                sender.focus();
                return;
            }
            else {
                sender.value = 5;
            }
        }
    }

    function StrToFloat(str) {
        var NewStr = "";
        for (var i = 0; i < str.length; i++) {
            if (str.charAt(i) != "," && str.charAt(i) != " ")
                NewStr += str.charAt(i);
        }

        if (NewStr == "")
            return 0;

        var f = parseFloat(NewStr);
        if (isNaN(f))
            return 0;

        return f;
    }

</script>